This reverts commit
7cc15ec6ea1504133dfe6febbdb12615550bb966.
Its risky to convert all the events in a go like this, as it
increases the out-of-order issues. It also isn't a full solution
to the motion hint issue as it will only work for the events
we happen to convert. It would be better to use serials to
handle motion hinting.
XEvent xevent;
Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
- while (XPending (xdisplay))
+ while (!_gdk_event_queue_find_first(display) && XPending (xdisplay))
{
XNextEvent (xdisplay, &xevent);